package com.ygqh.baby.model;

import java.io.Serializable;
import java.util.Date;

import org.springframework.data.mongodb.core.mapping.Document;

import com.ygqh.baby.ao.DataStatus;
import com.ygqh.baby.ao.MessageType;

/**
 * 聊天记录
 * @author Ss
 *
 */
@Document(collection = "YG_CHAT_RECORD")
public class ChatRecord implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = -7020682847732127084L;

	private String id;

	/**
	 * 用户id
	 */
	private Long userId;

	/**
	 * 用户id
	 */
	private String userNickName;

	/**
	 * 详细内容
	 */
	private String detailContent;
	
	/**
	 * 原图（信息类型为图片时可用）
	 */
	private String originalImage;
	
	/**
	 * 消息类型
	 */
	private MessageType messageType = MessageType.Text;
	
	/**
	 * 发送人Id
	 */
	private String sendUserId;
	
	/**
	 * 发送人昵称
	 */
	private String sendNickName;
	
	/**
	 * 发送人头像
	 */
	private String sendHeadId;
	
	/**
	 * 接收人Id
	 */
	private String receiveUserId;
	
	/**
	 * 接收人昵称
	 */
	private String receiveNickName;
	
	/**
	 * 接收人头像
	 */
	private String receiveHeadId;

	/**
	 * 是否已读
	 */
	private Boolean isRead = Boolean.FALSE;

	/**
	 * 创建时间
	 */
	private Date createTime;
	
	/**
	 * 状态
	 */
	private DataStatus status = DataStatus.Valid;

	/**
	 * 修改时间
	 */
	private Date updateTime;

	/**
	 * 修改人
	 */
	private String updateBy;

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getDetailContent() {
		return detailContent;
	}

	public void setDetailContent(String detailContent) {
		this.detailContent = detailContent;
	}

	public MessageType getMessageType() {
		return messageType;
	}

	public void setMessageType(MessageType messageType) {
		this.messageType = messageType;
	}

	public String getSendUserId() {
		return sendUserId;
	}

	public void setSendUserId(String sendUserId) {
		this.sendUserId = sendUserId;
	}

	public String getSendNickName() {
		return sendNickName;
	}

	public void setSendNickName(String sendNickName) {
		this.sendNickName = sendNickName;
	}

	public String getReceiveUserId() {
		return receiveUserId;
	}

	public void setReceiveUserId(String receiveUserId) {
		this.receiveUserId = receiveUserId;
	}

	public String getReceiveNickName() {
		return receiveNickName;
	}

	public void setReceiveNickName(String receiveNickName) {
		this.receiveNickName = receiveNickName;
	}

	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	public DataStatus getStatus() {
		return status;
	}

	public void setStatus(DataStatus status) {
		this.status = status;
	}

	public Boolean getIsRead() {
		return isRead;
	}

	public void setIsRead(Boolean isRead) {
		this.isRead = isRead;
	}

	public String getSendHeadId() {
		return sendHeadId;
	}

	public void setSendHeadId(String sendHeadId) {
		this.sendHeadId = sendHeadId;
	}

	public String getReceiveHeadId() {
		return receiveHeadId;
	}

	public void setReceiveHeadId(String receiveHeadId) {
		this.receiveHeadId = receiveHeadId;
	}

	public Long getUserId() {
		return userId;
	}

	public void setUserId(Long userId) {
		this.userId = userId;
	}

	public String getOriginalImage() {
		return originalImage;
	}

	public void setOriginalImage(String originalImage) {
		this.originalImage = originalImage;
	}

	public String getUserNickName() {
		return userNickName;
	}

	public void setUserNickName(String userNickName) {
		this.userNickName = userNickName;
	}

	public Date getUpdateTime() {
		return updateTime;
	}

	public void setUpdateTime(Date updateTime) {
		this.updateTime = updateTime;
	}

	public String getUpdateBy() {
		return updateBy;
	}

	public void setUpdateBy(String updateBy) {
		this.updateBy = updateBy;
	}

	@Override
	public String toString() {
		return "ChatRecord{" +
				"id='" + id + '\'' +
				", userId=" + userId +
				", userNickName='" + userNickName + '\'' +
				", detailContent='" + detailContent + '\'' +
				", originalImage='" + originalImage + '\'' +
				", messageType=" + messageType +
				", sendUserId='" + sendUserId + '\'' +
				", sendNickName='" + sendNickName + '\'' +
				", sendHeadId='" + sendHeadId + '\'' +
				", receiveUserId='" + receiveUserId + '\'' +
				", receiveNickName='" + receiveNickName + '\'' +
				", receiveHeadId='" + receiveHeadId + '\'' +
				", isRead=" + isRead +
				", createTime=" + createTime +
				", status=" + status +
				", updateTime=" + updateTime +
				", updateBy='" + updateBy + '\'' +
				'}';
	}
}
